# Example: Control visibility with If-Then-Else logic

This example shows how to create a graphic object that is to be visible only when tag1 exceeds a specified value.

## To create a graphic object that is to be visible only when tag1 exceeds a specified value

1. Draw the object.
2. In the Visibility animation dialog box, type the expression:

   `If (tag1 > 55) Then 1 Else 0`

3. Specify that the object is to be visible when the expression is true.

## See also

About expressions

If-Then-Else logic